package com.ruoyi.project.modules.processBranchCondition.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.modules.processBranchCondition.mapper.ProcessBranchConditionMapper;
import com.ruoyi.project.modules.processBranchCondition.domain.ProcessBranchCondition;
import com.ruoyi.project.modules.processBranchCondition.service.IProcessBranchConditionService;
import com.ruoyi.common.core.text.Convert;

/**
 * 分支条件Service业务层处理
 * 
 * @author smallrain
 * @date 2022-04-02
 */
@Service
public class ProcessBranchConditionServiceImpl implements IProcessBranchConditionService 
{
    @Autowired
    private ProcessBranchConditionMapper processBranchConditionMapper;

    /**
     * 查询分支条件
     * 
     * @param branchConditionId 分支条件主键
     * @return 分支条件
     */
    @Override
    public ProcessBranchCondition selectProcessBranchConditionByBranchConditionId(Long branchConditionId)
    {
        return processBranchConditionMapper.selectProcessBranchConditionByBranchConditionId(branchConditionId);
    }

    /**
     * 查询分支条件列表
     * 
     * @param processBranchCondition 分支条件
     * @return 分支条件
     */
    @Override
    public List<ProcessBranchCondition> selectProcessBranchConditionList(ProcessBranchCondition processBranchCondition)
    {
        return processBranchConditionMapper.selectProcessBranchConditionList(processBranchCondition);
    }

    /**
     * 新增分支条件
     * 
     * @param processBranchCondition 分支条件
     * @return 结果
     */
    @Override
    public int insertProcessBranchCondition(ProcessBranchCondition processBranchCondition)
    {
        return processBranchConditionMapper.insertProcessBranchCondition(processBranchCondition);
    }

    /**
     * 修改分支条件
     * 
     * @param processBranchCondition 分支条件
     * @return 结果
     */
    @Override
    public int updateProcessBranchCondition(ProcessBranchCondition processBranchCondition)
    {
        return processBranchConditionMapper.updateProcessBranchCondition(processBranchCondition);
    }

    /**
     * 批量删除分支条件
     * 
     * @param branchConditionIds 需要删除的分支条件主键
     * @return 结果
     */
    @Override
    public int deleteProcessBranchConditionByBranchConditionIds(String branchConditionIds)
    {
        return processBranchConditionMapper.deleteProcessBranchConditionByBranchConditionIds(Convert.toStrArray(branchConditionIds));
    }

    /**
     * 删除分支条件信息
     * 
     * @param branchConditionId 分支条件主键
     * @return 结果
     */
    @Override
    public int deleteProcessBranchConditionByBranchConditionId(Long branchConditionId)
    {
        return processBranchConditionMapper.deleteProcessBranchConditionByBranchConditionId(branchConditionId);
    }
}
